const mongoose = require('mongoose')

const publicSchema = new mongoose.Schema({
    user: { //关联用户表
        type: mongoose.Schema.Types.ObjectId,
        ref: 'user' //引用
    },
    message: String,
    date: String
})
module.exports = mongoose.model('publicmsg', publicSchema)